package org.x.casemodule.enums;

public enum PlatformEnum {
    //'GOOGLE','OUTLOOK','COURT_SYSTEM'
    GOOGLE("GOOGLE", "谷歌"),
    OUTLOOK("OUTLOOK", "微软"),
    COURT_SYSTEM("COURT_SYSTEM", "法院系统");

    private String code;
    private String name;
    PlatformEnum(String code, String name) {
        this.code = code;
        this.name = name;
    }

    public String getCode() {
        return code;
    }

    public String getName() {
        return name;
    }

    public static PlatformEnum getByCode(String code) {
        for (PlatformEnum value : values()) {
            if (value.code.equals(code)) {
                return value;
            }
        }
        return null;
    }

    public static PlatformEnum getByName(String name) {
        for (PlatformEnum value : values()) {
            if (value.name.equals(name)) {
                return value;
            }
        }
        return null;
    }




}
